import time

from app.modules.apps.container_ad import AdempiereApp

ad = AdempiereApp(app_id='usky:owms',
                  app_name='owms',
                  zone_home_path='/usr/local/app/uc.usaws.warehouse.usky',
                  zone_alias='usky',
                  port='16280',
                  nas_app_package_path='/mnt/winitRelease/owms/OWMS-1.5.5.9_161102_1554',
                  db_name='OWMS_USEA')

ad.stop()
print ad.is_started()

ad.uninstall_app()
ad.install_app()
ad.restart()
time.sleep(3)
print ad.is_started()

# ad.stop()
time.sleep(10)
print ad.is_started()
#
# ad.stop()
# time.sleep(3)
# print ad.is_started()
